<template>
  <button @click="showkai = !showkai">显示与隐藏</button>
  <div v-show="showkai" class="box">隐藏盒子</div>
</template>

<script>
import { ref } from "vue";
export default {
  setup() {
    const showkai = ref("false");
    return { showkai };
  },
};
</script>

<style>
.box {
  width: 300px;
  height: 200px;
  border: 5px solid skyblue;
  line-height: 200px;
  text-align: center;
}
</style>